package com.qf.common.core.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * @author zdl
 * @date 2025/3/25
 */
public class DateUtils {
    /**
     * 将日期对象 转为指定格式的日期字符串
     * @param localDate
     * @param pattern
     * @return
     */
    public static  String date2Str(LocalDate localDate,String pattern){
        return localDate.format(DateTimeFormatter.ofPattern(pattern));
    }
}
